home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 626-637 / disk_629 / apig / apig31.lzh / aslfont1.rexx < prev    next >
OS/2 REXX Batch file  |  1992-01-25  |  983b  |  45 lines

  1. /* Example of using ASL Library FONT requester */
  2.  
  3. /*  */
  4.  x = addlib("apig.library",0,-30,0)
  5.  
  6. call set_apig_globals()
  7.  
  8. freq = ALLOCASLREQUEST(ASL_FONTREQUEST,null())
  9.  
  10. portname = "aslfont1_port"     
  11.                              
  12. p = openport(portname)  
  13.  
  14. WaitForPort portname  
  15.  
  16. wintitle = "ASL FONT Requester Example"
  17.  
  18. winidcmp = CLOSEWINDOW 
  19.                              
  20. winflags = WINDOWCLOSE+WINDOWDRAG+WINDOWSIZING+WINDOWDEPTH+GIMMEZEROZERO
  21.  
  22. win = openwindow(portname,0,0,640,200,2,4,winidcmp,winflags,wintitle,null(),0,0,0)
  23.  
  24. wrastport = getwindowrastport(win)  /* need rastport to do graphics/itext */
  25.  
  26. do forever
  27.  
  28.    textfontattr = ASLREQUEST(freq,null(),freq)  /* note the font requester */
  29.                                                 /* owns the return value   */
  30.  
  31.    if textfontattr = null() then
  32.       leave
  33.  
  34.     z = pitext(wrastport,10,30,"The FONT you selected",1,2,JAM2,textfontattr)
  35.     wait 3 secs
  36. end
  37.  
  38. call FREEASLREQUEST(freq)
  39.  
  40. call CLOSEWINDOW(win)
  41.  
  42. exit
  43.  
  44.  
  45.